client^2 | | the network address of the server | itself so it is able to communicate with the server | the same computer as its server or on a different computer | | a server at the same time | many servers to perform different functions | - Waiting for interactions with the end-user, and responding when interactions occur
- Waiting for messages coming from the server, and responding when messages arrive
| messages to the server to request services | a connection to a server | a server unless the server is listening | cleanly including includes disconnecting from a server if it is still connected | messages coming from the server | | | | A program or process that connects to another program or process, using a communication channel, in order to request a service | to connect to the server if the server does not initially respond | | | | the disconnection of the server, because the server crashed or the network failed or because either the client or server requested disconnection | | client^2 |
server | to serve currently connected clients after it has stopped listening | | itself so that it is able to provide the required service | the same computer as its clients or on a different computer | new client connections if it has stopped listening | a client at the same time | | - Waiting for interactions with the user who is in charge of the server, and responding as necessary
- Waiting for clients to try to connect and establishing connections as needed
- For each connected client, waiting for messages coming from that client, and responding when messages arrive
| | | | when necessary, which involves such actions as notifying each client before terminating its connection | messages from connected clients: performing computations or obtaining information, and normally sending some information back to the requesting client and perhaps sending a message to another client or broadcasting messages to many clients at once. | many clients simultaneously | messages from all the connected clients | listening if the number of connected clients becomes too high, or prior to shutting down | A program or process that, in response to requests from clients, provides some kind of service | | at least two concurrent threads, and in general n+2, threads where n is the number of connected clients | a record of the connection while a client is connected | clients attempting to connect | connections from many clients | clients - the client may request disconnection by sending a message to the server, the client may just disappear suddenly due to the client crashing or the network connecting going down, or the server may force a client to disconnect if the client is not behaving well | process |